// pages/index/mindEvaluate/mindEva.js
const app = getApp();
const imgurl = getApp();
Page({
  data:{
    url: '',
    imgurl: '',
    heartmark: []
  },
onLoad(options){
  this.setData({
    url: app.globalData.URL,
    imgurl: imgurl.globalData.losthost
  });
  console.log(this.data.imgurl);
  let that = this;
  wx.request({
    url: that.data.url+'heartmark/findByPage',
    method: 'GET',
    data: {
      pageNum: 1,
      pageSize: 5,
    },
    success(resp){
      let result = resp.data;
      that.setData({
        heartmark: result.data.list
      });
      console.log(that.data.heartmark);
    }
  })
},
  goContent(e){
    let value = e.currentTarget.dataset.id;
    wx.navigateTo({
      url: './qxtest/qxtest?id='+value,
    })
  },

  goIndex(){
    wx.switchTab({
      url: '../index/index',
    })
  }
})